<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Member Registration Form</title>
    <style>
        .error {
            color: #ff0000;
            font-weight: bold;
        }
    </style>
</head>

<body>
<form method="post" th:object="${member}">

    <table>
        <tr>
            <td><label for="name">Name</label></td>
            <td><input type="text" th:field="*{name}" required/></td>
            <td><span class="error" th:if="${#fields.hasErrors('name')}" th:errors="*{name}"></span></td>
        </tr>
        <tr>
            <td><label for="email">Email</label></td>
            <td><input type="email" th:field="*{email}" required/></td>
            <td><span class="error" th:if="${#fields.hasErrors('email')}" th:errors="*{email}"></span></td>
        </tr>
        <tr>
            <td><label for="phone">Phone</label></td>
            <td><input type="text" th:field="*{phone}"/></td>
            <td><span class="error" th:if="${#fields.hasErrors('phone')}" th:errors="*{phone}"></span></td>
        </tr>
        <tr>
            <td colspan="3"><input type="submit"/></td>
        </tr>
    </table>
</form>
</body>
</html>